﻿using System;
using System.Collections.Generic;
 
using System.Text;

namespace GGSharp.Http
{
    public class RetrievePasswordData : HttpStructureDataBase
    {
        private int _number;
        private string _tokenID;
        private string _tokenValue;

        protected RetrievePasswordData() { }

        public RetrievePasswordData(int number, string tokenID, string tokenValue)
        {
            _number = number;
            _tokenID = tokenID;
            _tokenValue = tokenValue;
        }

        public int Number
        {
            get { return _number; }
            set { _number = value; }
        }

        public string TokenID
        {
            get { return _tokenID; }
            set { _tokenID = value; }
        }

        public string TokenValue
        {
            get { return _tokenValue; }
            set { _tokenValue = value; }
        }

        public virtual int Hash
        {
            get { return getHttpHash(_number.ToString()); }
        }

        public override string QueryString
        {
            get
            {
                StringBuilder queryString = new StringBuilder();
                queryString.Append("userid=");
                queryString.Append(Number);
                queryString.Append("&tokenid=");
                queryString.Append(TokenID);
                queryString.Append("&tokenval=");
                queryString.Append(TokenValue);
                queryString.Append("&code=");
                queryString.Append(Hash);
                return queryString.ToString();
            }
        }

        public override void Read(System.IO.StreamReader reader)
        {
            throw new NotImplementedException();
        }


    }
}
